# 使用openjdk:8-jdk-alpine作为基础镜像
FROM openjdk:8-jdk-alpine
# 复制jar文件到镜像中
ADD ./target/bysc-dev-executor-1.0-SNAPSHOT.jar /app/bysc-dev-executor-1.0-SNAPSHOT.jar

# 设置工作目录
WORKDIR /app

# 暴露容器的端口
EXPOSE 8012 8730 9999
# 设置时区为东八区
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# 定义默认命令，启动Java应用程序
CMD ["java", "-jar","-XX:MaxMetaspaceSize=128m", "-Xms64m", "-Xmx64m", "-Xmn16m","-XX:SurvivorRatio=6", "-Dserver.port=8012", "bysc-dev-executor-1.0-SNAPSHOT.jar"]